#ifndef STACK_H
#define STACK_H

#include <string>
using namespace std;

// Why do we use the CSCI123 namespace?
// Will the code work without the namespace?
namespace CSCI123 {

	/**
	 * Contains one stack frame which is the data
	 * and a pointer to the next frame
	 */
	struct Frame {
		string data;
		Frame *next;
	};
	// redefine a frame pointer because I'm lazy and
	// don't want to write someDataType *identifier
	typedef Frame* FramePtr;

	/**
	 * Stack class Last In/First Out data structure
	 * @author: Brad Rippe(brippe@fullcoll.edu) 
	 */
	class Stack {
	public:
		Stack();
		Stack(const Stack& aStack);
		~Stack();
		void push(const string& aString);
		string pop();
		bool isEmpty() const;
		void getTop(string& aTopData) const; 
		friend ostream& operator <<(ostream& out, const Stack& aStack); 
	private:
		FramePtr top;
	};
}
#endif
